package cog.bengxiao.sms.business.user.contriller;

import cog.bengxiao.sms.business.user.model.CustomerInfo;
import cog.bengxiao.sms.business.user.services.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserServices userServices;

    //RESUful
    @RequestMapping(value="/list",method = RequestMethod.GET)
    public List<CustomerInfo> list(String username){
        List<CustomerInfo> lis =userServices.findCustomerInfoList(username);
        return lis;
    }
}
